<template>
  <div>
    <div class="header">
      <div class="title"><text>考勤管理</text></div>
      <div class="clickform">
        <el-form ref="form" inline :model="form">
          <el-form-item label="">
            <el-col :span="11" style="margin-top: 4%">
              <el-date-picker type="date" placeholder="选择日期" size="mini" style="width: 130px;"></el-date-picker>
            </el-col>
          </el-form-item>
          <el-form-item label="" size="mini">
            <el-select style="width:100px; margin-top: 12%;" placeholder="请选择活动区域">
              <el-option label="" value="shanghai"></el-option>
              <el-option label="" value="beijing"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="" size="mini">
            <el-input style="margin-top: 6%;"></el-input>
          </el-form-item>
          <el-button type="primary" size="mini" style="margin-top: 2%;">查询</el-button>
        </el-form>
      </div>
    </div>
    <div class="titlt-title"><span>今日课表</span></div>
    <!-- 内容 -->
    <div class="box-card">

      <div class="kaoqin" style="margin-left: 30px; display: flex;">
        <el-checkbox  v-model="checkAll"  @change="handleCheckAllChange" style="margin-top:1%;"  label="全选" name="type"></el-checkbox>
        <el-button type="primary" size="small " style=" margin-left: 10px; width: 90px; font-weight: bold; color: #fff;">考勤</el-button>
      </div>

      <div style="margin-top: 20px;">

         <div class="body" v-for="(item,k) in list" :key="item.id">
            <el-checkbox name="type" @change="handleCheckedCitiesChange(k)" v-model="checked"  style="margin-left: 10px;"></el-checkbox>
            <div class="img" style="margin-left: 15px;"><img style="width: 100%; height: 100%; border-radius: 50%;" src="" alt=""></div>
            <div style="width: 4%; ">{{item.teachername}}</div>
            <div class="text1" style="margin-left: 100px;"><span>一对一排课</span></div>
            <div class="icon el-icon-reading" style="margin-left: 10px;">{{item.coursename}}</div>
            <div class="icon el-icon-timer" style="width: 15%; margin-left: 10px;"> {{item.coursedate}}</div>
            <div class="icon el-icon-user" style="margin-left: 10px;"> {{item.classrooms}}</div>
            <div class="icon el-icon-s-claim" style="margin-left: 230px;"> {{item.checkedName=='未签到'?'No':'未签到'}}</div>
            <div class="icon el-icon-edit" style="margin-left: 20px;">  {{item.checkedName=='签到'?'Yes':'签到'}}</div>
         </div>
      </div>
    </div>  
      
  </div>
</template>
<script>
    export default {
        data(){
            return{
               list:[],
               checkAll:false,
               checked:false,
               addform:{}
            }
        },
        created(){
          this.attencelist()
        },
        methods:{
          async attencelist(){
              const {data:res} = await this.$http.get('http://www.eshareedu.cn/edusystems/api/coursetables/checked')
              console.log(res)
              this.list=res.data.list
            },
            handleCheckAllChange(val){
                console.log(val)
            },
            handleCheckedCitiesChange(value,key){
              console.log(value)
              console.log(key)
            //   value==false ? this.checkAll:false
              
            }
        }
    }
</script>
<style scoped>
    .icon{
        width: 8%;
        /* background-color: fuchsia; */
    }
    .text1{
        width: 6%;
        height: 40%;
        background-color: rgb(128, 223, 128);
        font-size: 10px;
        color: forestgreen;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .img{
        width:30px;
        height: 30px;
        background-color: dodgerblue;
        border-radius: 50%;
    }
    .body{
        width: 100%;
        height: 80px;
        margin-top: 20px;
        border: 1px solid rgb(201, 199, 199);
        display: flex;
        align-items: center;
    }
  .header {
    width: 100%;
    display: flex;
    height: 50px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    box-shadow: 1px 1px 3px 1px rgb(200, 226, 241);
    background-color: rgb(233, 237, 240);
    align-items: center;
   
  }

  .clickform {
    width: 500px;
    height: 100%;
  }

  .titlt-title {
    display: flex;
    font-size: 11px;
    margin-top: 10px;
  }

  .title {
    width: 100px;
    height: 100%;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    background-color: rgb(51, 129, 219);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 17px;
    font-weight: bold;
    color: #fff;
  }

  .box-card {
    margin-top: 10px;
    width: 100%;
    height: 100%;
    /* background-color: #fff; */
  }

</style>
